<%@page import="day12.User"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>EL表达式运算符</title>
</head>
<body>
	${365*2 } ${user==null }

	<%
		List list = new ArrayList();
		list.add("a");
		list.add("b");
		request.setAttribute("list", list);
	%>

	<c:if test="${!empty(list) }">
		<c:forEach var="str" items="${list }">
	${str }
	</c:forEach>
	</c:if>
	<c:if test="${empty(list) }">
没有您想看的数据
	</c:if>
	<%session.setAttribute("user", new User("xiayq"));%>
	${user==null?"对不起，您没有登陆":user.username}
	
	
	<!-- 数据回显页面 -->
	
	<%
	User user=new User();
	user.setGender("male");
	request.setAttribute("user", user);
	
	
	%>
	<input type="radio" name="gender" value="male" ${user.gender=='male'?'checked':'' }>男
	<input type="radio" name="gender" value="female" ${user.gender=='female'?'checked':'' }>女
	<hr>
	
	<%
	user = new User();
	String likes[]={"zuqiu","dance"};
	user.setLikes(likes);
	request.setAttribute("user", user);
	%>
	<input type="checkbox" name="like" value="dance">跳舞
	<input type="checkbox" name="like" value="zuqiu">足球

</body>
</html>